﻿using SocketServer;
using SocketServer.SocketResult;
using SocketServer.WebSocketAction;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestSocektServer.SocketAction
{
    public class TestAction : WebSocketServerActionBase
    {
        public ISocketResult Action1()
        {
            this.Socket.Send("可以随便输出");
            return RSuccess("我是Action1");
        }

        public ISocketResult Action2(int IntParamtetr, string[] strArray, List<string> strList, double number = 10.55)
        {
            return RSuccess("我是Action2", new 
            {
                IntParamtetr,
                strArray,
                strList,
                number
            });
        }

        public ISocketResult Action3(TestModel Model)
        {
            return RSuccess("我是Action3", Model);
        }

        public class TestModel
        {
            public string Name { get; set; }

            public int Value { get; set; }
        }
    }
}
